using System;
using System.Xml.Serialization;
using Limestone.Fields;
using Utils;

namespace Limestone
{
    public interface IPage
    {
        [XmlAttribute]
        string Name { get; set; }

        /// <summary>
        /// The path always begins with a / and includes the page name
        /// </summary>
        [XmlAttribute]
        string Path { get; set; }

        [XmlAttribute]
        string Title { get; set; }

        [XmlAttribute]
        string TemplatePath { get; set; }

        [XmlAttribute]
        bool Hidden { get; set; }

        [XmlAttribute]
        PageSortType SortChildPagesBy { get; set; }

        [XmlAttribute]
        int SortValue { get; set; }

        [XmlArray("ListItems")]
        [XmlArrayItem("ListItem", Type = typeof (AbstractXmlSerializer<Field>))]
        FieldCollection Fields { get; set; }

        [XmlIgnore]
        string ParentPath { get; }

        [XmlAttribute]
        DateTime Created { get; set; }

        [XmlAttribute]
        string CreatedBy { get; set; }

        [XmlAttribute]
        DateTime Modified { get; set; }

        [XmlAttribute]
        string ModifiedBy { get; set; }

        [XmlAttribute]
        DateTime Deleted { get; set; }

        [XmlAttribute]
        string DeletedBy { get; set; }

    }
}